<?php

namespace App\Http\Validations\Admin;

use Illuminate\Contracts\Validation\Validator;

class BasicBatchValidation {
    public function create() {
        $rules = [
            'name'=>['required'],
            'exam_start_at'=>['required'],
            'exam_end_at'=>['required','after:exam_start_at'],
            'password'=>['required'],
            'address'=>['required'],
            ];
        $attributes = [
            'name'=>'考试批次',
            'exam_start_at'=>'考试开始时间',
            'exam_end_at'=>'考试结束时间',
            'password'=>'考试密码',
            'address'=>'考试地址',
        ];
        return ['rules' =>$rules,
            'attributes' => $attributes,
            'messages' => []
        ];
    }

    //验证后添加的钩子函数
    public function customValidate(Validator $validator) {
        //
    }
}
